<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 编写函数has(arr , 60) 判断数组中是否存在60这个元素，返回布尔类型
     var arr = [1, 2, 3, 60]
     var arr2 = [1, 2, 3]
     
     function has() {
       // code in here ...
     }
     
     console.log(has(arr, 60)) // true
     console.log(has(arr2, 60)) // false */
     var arr = [1, 2, 3,60];
     var arr2 = [1, 2, 3];
     var arr3=[2,5,60,89,30];
     function fn(arrtest){
        for(var i=0;i<arrtest.length;i++){
            if(arr[i]==60){
               return true;
            }
     }
        return false;
    }
     console.log(fn(arr));
     console.log(fn(arr2));
     console.log(fn(arr3));
    </script>
</body>
</html>